package handler

import (
	"gorm.io/gorm"

	"forum/pkg/domain"
	"forum/pkg/repository"
	"forum/pkg/service"
)

func initializeUserHandler(db *gorm.DB) domain.UserHandler {
	userRepository := repository.NewUserRepository(db)
	userService := service.NewUserService(userRepository)
	return NewUserHandler(userService)
}

func initializeProfileHandler(db *gorm.DB) domain.ProfileHandler {
	profileRepository := repository.NewProfileRepository(db)
	userService := service.NewProfileService(profileRepository)
	return NewProfileHandler(userService)
}
